var express = require('express');
var router = express.Router();
// var deleteDetail = require('../../utls/mgdb').deleteDetail
var deleteDetail = require('../../utls/mgdb').deleteDetail

// var {deleteDetail} = require('../../utls/mgdb')

router.delete('/:news_name/:id', function(req, res, next) {
    console.log('frvctf',req.params)
    deleteDetail({
        collectionName:req.params.news_name,_id:req.params.id
    }).then(
        result=>res.send(result)
    ).catch(
        err=>res.send(err)
    )
    });
        
    module.exports = router;